import moment from 'moment'
export function generateUuid() {
  const mydate = new Date()
  const uuid = 'cms' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds()
  return uuid
}

export function formatDate(date, flag) {
	if (flag) {
		return date && moment(date).format('YYYY-MM-DD HH:mm:ss')
	} else {
		return date && moment(date).format('YYYY-MM-DD')
	}
}
